import React, { Component } from 'react';
import { Link } from "react-router-dom";
import './index.less';
/*
import {
  Form, Icon, Input, Button, Checkbox,
} from 'antd';
const FormItem = Form.Item;
class NormalLoginForm extends React.Component {
  handleSubmit = (e) => {
    e.preventDefault();
    this.props.form.validateFields((err, values) => {
      if (!err) {
        console.log('Received values of form: ', values);
      }
    });
  }

  render() {
    const { getFieldDecorator } = this.props.form;
    return (
      <Form onSubmit={this.handleSubmit} >
        <FormItem>
          {getFieldDecorator('userName', {
            rules: [{ required: true, message: 'Please input your username!' }],
          })(
            <Input prefix={<Icon type="user" style={{ color: 'rgba(0,0,0,.25)' }} />} placeholder="请输入手机号 / 邮箱" />
          )}
        </FormItem>
        <FormItem>
          {getFieldDecorator('password', {
            rules: [{ required: true, message: 'Please input your Password!' }],
          })(
            <Input prefix={<Icon type="lock" style={{ color: 'rgba(0,0,0,.25)' }} />} type="password" placeholder="请输入密码" />
          )}
        </FormItem>
        <FormItem>
          {getFieldDecorator('remember', {
            valuePropName: 'checked',
            initialValue: true,
          })(
            <Checkbox>下次自动登录</Checkbox>
          )}
          <a className="login-form-forgot" >忘记密码？</a>
          <Button type="primary" htmlType="submit" className="login-form-button">
            登录
            </Button>
          <p>没有账号？<a>注册</a></p>
        </FormItem>
      </Form>
    );
  }
}
const WrappedNormalLoginForm = Form.create()(NormalLoginForm); 

<div className={className}>
        <p className="title">登录</p>
        <WrappedNormalLoginForm></WrappedNormalLoginForm>
</div>
*/

import { Button } from 'antd';
import userLogo from '../../images/99_b.jpg';
class LoginForm extends Component {
  render() {
    let { className } = this.props;
    if (className) {
      className += " login-form"
    } else {
      className = "login-form"
    }
    return <div className={className}>
        <img src={userLogo} alt="" className="user-logo" />
        <p className="user-text">
          Hi, <span className="user-name">蔷之秘</span>
          <br />
          今天是你来到学而思在线的第<span className="day">230</span>天
        </p>
        <Link to="/mine">
          <Button type="primary" className="login-form-button">
            查看我的课程
          </Button>
        </Link>
      </div>;
  }
}

export default LoginForm;